import React, { Component } from 'react'

export default class Item extends Component {
    render() {
        return (
            <div className="item">
              <div>操作  <span onClick={()=>{
                  console.log('子组件 修改按钮被点击')
                  this.props.editItem(this.props.item);
              }}>修改</span> <span  onClick={()=>{
                 this.props.removeItem(this.props.item)


              }}>删除</span></div>
              <div key={this.props.item.id}>
               头像: <img src={this.props.item.image} alt="" /><br/>
               姓名：{this.props.item.name}<br/>
               详情：{this.props.item.desc}<br/>
               </div>
            </div>
        )
    }
}
